package com.bingxue.edu.common.config;

import com.bingxue.edu.framework.config.DynamicConfig;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 安全策略配置
 * @author panbo
 * @since 2024/7/24
 */
@Data
@DynamicConfig
@Configuration(proxyBeanMethods = false)
@ConfigurationProperties(prefix = "security.policy")
public class SecurityPolicyProperties {

    /**
     * 允许连续登录最大错误次数，超出后将锁定账户
     * 为0则不限制
     */
    private int maxLoginFailedCount = 10;

    /**
     * 连续登录错误后锁定账户时间（单位分钟）
     */
    private int loginFailedLockMinutes = 10;

    /**
     * 短信验证码有效期(单位分钟)
     */
    private int smsCaptchaExpireMinutes = 5;

    /**
     * 短信验证码长度
     */
    private int smsCaptchaLength = 6;


}
